package com.nwpu.coursesupport.view.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.nwpu.coursesupport.controller.AbstractController;
import com.nwpu.coursesupport.entity.bean.JSONResult;

@Controller
@RequestMapping("/taskPersonAssistantDetail")
public class TaskPersonalDetailAssistantViewController extends AbstractController{

	@RequestMapping("/detail")
	public String detail(@RequestParam("taskId")Integer taskId,HttpServletRequest request){
		JSONResult rst=invokeService("taskPersonalDetailAssistantView", "detail", "{\"taskId\":\"" + taskId+ "\"}");
		request.setAttribute("data", this.parseData(rst));
		return "";
	}
	
	@RequestMapping("/ajaxDetail")
	@ResponseBody
	public JSONResult ajaxDetail(@RequestParam("taskId")Integer taskId){
		JSONResult rst=invokeService("taskPersonalDetailAssistantView", "detail", "{\"id\":\"" + taskId + "\"}");
		return rst;
	}
	
	
}
